import 'dart:convert';

class QAUser {
  String companyId = "";
  String createBy = "";
  String delFlag = "";
  String email = "";
  String extprop = "";
  String id = "";
  String level = "";
  String loginDate = "";
  String loginFlag = "";
  String loginIp = "";
  String loginName = "";
  String major = "";
  String mobile = "";
  String name = "";
  String no = "";
  String officeId = "";
  String password = "";
  String phone = "";
  String photo = "";
  String qrcode = "";
  String remarks = "";
  String reserve1 = "";
  String reserve2 = "";
  String resume = "";
  String sign = "";
  String updateBy = "";
  String updateDate = "";
  String usertype = "";
  String wechat = "";

  QAUser({
    this.companyId = "",
    this.createBy = "",
    this.delFlag = "",
    this.email = "",
    this.extprop = "",
    this.id = "",
    this.level = "",
    this.loginDate = "",
    this.loginFlag = "",
    this.loginIp = "",
    this.loginName = "",
    this.major = "",
    this.mobile = "",
    this.name = "",
    this.no = "",
    this.officeId = "",
    this.password = "",
    this.phone = "",
    this.photo = "",
    this.qrcode = "",
    this.remarks = "",
    this.reserve1 = "",
    this.reserve2 = "",
    this.resume = "",
    this.sign = "",
    this.updateBy = "",
    this.updateDate = "",
    this.usertype = "",
    this.wechat = "",
  });

  factory QAUser.fromJson(Map<String, dynamic> data) {
    return QAUser(
      companyId: data["companyId"] ?? "",
      createBy: data["createBy"] ?? "",
      delFlag: data["delFlag"] ?? "",
      email: data["email"] ?? "",
      extprop: data["extprop"] ?? "",
      id: data["id"] ?? "",
      level: data["level"] ?? "",
      loginDate: data["loginDate"] ?? "",
      loginFlag: data["loginFlag"] ?? "",
      loginIp: data["loginIp"] ?? "",
      loginName: data["loginName"] ?? "",
      major: data["major"] ?? "",
      mobile: data["mobile"] ?? "",
      name: data["name"] ?? "",
      no: data["no"] ?? "",
      officeId: data["officeId"] ?? "",
      password: data["password"] ?? "",
      phone: data["phone"] ?? "",
      photo: data["photo"] ?? "",
      qrcode: data["qrcode"] ?? "",
      remarks: data["remarks"] ?? "",
      reserve1: data["reserve1"] ?? "",
      reserve2: data["reserve2"] ?? "",
      resume: data["resume"] ?? "",
      sign: data["sign"] ?? "",
      updateBy: data["updateBy"] ?? "",
      updateDate: data["updateDate"] ?? "",
      usertype: data["usertype"] ?? "",
      wechat: data["wechat"] ?? "",
    );
  }

  Map<String, dynamic> toJson() {
    return {
      "companyId": companyId,
      "createBy": createBy,
      "delFlag": delFlag,
      "email": email,
      "extprop": extprop,
      "id": id,
      "level": level,
      "loginDate": loginDate,
      "loginFlag": loginFlag,
      "loginIp": loginIp,
      "loginName": loginName,
      "major": major,
      "mobile": mobile,
      "name": name,
      "no": no,
      "officeId": officeId,
      "password": password,
      "phone": phone,
      "photo": photo,
      "qrcode": qrcode,
      "remarks": remarks,
      "reserve1": reserve1,
      "reserve2": reserve2,
      "resume": resume,
      "sign": sign,
      "updateBy": updateBy,
      "updateDate": updateDate,
      "usertype": usertype,
      "wechat": wechat,
    };
  }

  @override
  String toString() {
    return json.encode(toJson());
  }
}
